load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

filegroup(
    name="all_srcs",
    srcs= glob(["**"]),
)

cmake(
    name="check",
    lib_source = ":all_srcs",
    out_static_libs = ["libcheck.a"],
    linkopts = select({
       "@platforms//os:macos": [],
       "//conditions:default": ["-lrt"],
    }),
    visibility = ["//visibility:public"],
)
